from twisted.internet.protocol import ClientCreator
from twisted.internet import defer
from twisted.protocols.loopback import loopbackAsync
from twisted.protocols import amp


client = amp.AMP()
server = amp.AMP()

d_connection = loopbackAsync(server,client)
print d_connection.called